<?php	
	$journals = $this->getAllJournal();
?>
<a class="btn btn-blue" href="<?php echo Epic::getUrl('admin/journal/addJournal');?>">Add journal</a>
<div class="box round first grid">
                <h2>
                    Journals</h2>
                <div class="block">
                    <table class="data display datatable" id="example">
					<thead>
						<tr>
							<th>ID</th>
							<th>Name</th>
							<th>Number pager</th>
							<th>ISSN</th>
							<th>Tool</th>
						</tr>
					</thead>
					<tbody>
					<?php if ($journals):?>
					<?php foreach ($journals as $journal):?>
						<tr class="odd gradeX" id="journal_<?php echo $journal['id_journal']?>">
							<td><?php echo $journal['id_journal']?></td>
							<td><?php echo $journal['name']?></td>
							<td><?php echo $journal['numpager']?></td>
							<td><?php echo $journal['issn']?></td>
							<td>
								<a class="btn-mini btn-black btn-view" href="<?php echo Epic::getUrl('admin/journal/viewJournal',array('id_journal'=>$journal['id_journal']))?>"><span></span>View</a>
								<a class="btn-mini btn-black btn-edit" href="<?php echo Epic::getUrl('admin/journal/addJournal',array('id_journal'=>$journal['id_journal']))?>"><span></span>Edit</a>
								<a class="btn-mini btn-black btn-delete" onclick="return deleter_journal(<?php echo $journal['id_journal']?>);"><span></span>Delete</a>
							</td>
						</tr>
					<?php endforeach;?>
					<?php endif?>
					</tbody>
				</table>
                </div>
            </div>